package com.nuoniu.sibanyun.service.cms.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.nuoniu.sibanyun.entity.cms.CmsArticle;
import com.nuoniu.sibanyun.mapper.cms.CmsArticleMapper;
import com.nuoniu.sibanyun.service.cms.ICmsArticleService;
import com.nuoniu.sibanyun.userThread.UserThreadLocal;
import org.springframework.stereotype.Service;


/**
 * <p>
 * 文章管理 服务实现类
 * </p>
 *
 * @author 小啊刚
 * @since 2022-06-17
 */
@Service
public class CmsArticleServiceImpl extends ServiceImpl<CmsArticleMapper, CmsArticle> implements ICmsArticleService {

    @Override
    public Page<CmsArticle> pageList(Page page, CmsArticle article) {
        QueryWrapper wrapper = new QueryWrapper();
        wrapper.eq("company_id", UserThreadLocal.get().getCompanyId());
        return page(page, wrapper);
    }
}
